package com.bishe.bishe.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.sql.Date;
import java.sql.Timestamp;

@Table(name = "orders")
public class Orders implements Serializable {
    @Id
    private Long orderId;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date orderTime;
    private State state;
    private Double orderTotal;
    private Customer customer;
    private int orderIdentify;
    private String orderTaketime;
    private Express express;
    private String orderReason;
    private String orderRemarks;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date orderDate;

    @Override
    public String toString() {
        return "Orders{" +
                "orderId=" + orderId +
                ", orderTime=" + orderTime +
                ", state=" + state +
                ", orderTotal=" + orderTotal +
                ", customer=" + customer +
                ", orderIdentify=" + orderIdentify +
                ", orderTaketime='" + orderTaketime + '\'' +
                ", express=" + express +
                ", orderReason='" + orderReason + '\'' +
                ", orderRemarks='" + orderRemarks + '\'' +
                ", orderDate=" + orderDate +
                '}';
    }

    public Orders(Long orderId, Date orderTime, State state, Double orderTotal, Customer customer, int orderIdentify, String orderTaketime, Express express, String orderReason, String orderRemarks, Date orderDate) {
        this.orderId = orderId;
        this.orderTime = orderTime;
        this.state = state;
        this.orderTotal = orderTotal;
        this.customer = customer;
        this.orderIdentify = orderIdentify;
        this.orderTaketime = orderTaketime;
        this.express = express;
        this.orderReason = orderReason;
        this.orderRemarks = orderRemarks;
        this.orderDate = orderDate;
    }

    public String getOrderRemarks() {
        return orderRemarks;
    }

    public void setOrderRemarks(String orderRemarks) {
        this.orderRemarks = orderRemarks;
    }

    public Orders() {
    }

    public Date getOrderDate() {
        return orderDate;
    }

    public void setOrderDate(Date orderDate) {
        this.orderDate = orderDate;
    }

    public String getOrderReason() {
        return orderReason;
    }

    public void setOrderReason(String orderReason) {
        this.orderReason = orderReason;
    }

    public Long getOrderId() {
        return orderId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public Date getOrderTime() {
        return orderTime;
    }

    public void setOrderTime(Date orderTime) {
        this.orderTime = orderTime;
    }

    public State getState() {
        return state;
    }

    public void setState(State state) {
        this.state = state;
    }

    public Double getOrderTotal() {
        return orderTotal;
    }

    public void setOrderTotal(Double orderTotal) {
        this.orderTotal = orderTotal;
    }

    public Customer getCustomer() {
        return customer;
    }

    public void setCustomer(Customer customer) {
        this.customer = customer;
    }

    public int getOrderIdentify() {
        return orderIdentify;
    }

    public void setOrderIdentify(int orderIdentify) {
        this.orderIdentify = orderIdentify;
    }

    public String getOrderTaketime() {
        return orderTaketime;
    }

    public void setOrderTaketime(String orderTaketime) {
        this.orderTaketime = orderTaketime;
    }

    public Express getExpress() {
        return express;
    }

    public void setExpress(Express express) {
        this.express = express;
    }
}
